package com.derive.education_service.web.admin.service;

import com.derive.education_service.common.global.ResponseMessage;
import com.derive.education_service.web.admin.bean.dto.RoleAddDto;
import com.derive.education_service.web.admin.bean.dto.RoleUpDto;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;

/**
 * 角色权限操作
 * 不提供编辑
 */
@Component
public interface RoleService {
    // 新增角色权限 -- 超管
    ResponseMessage addRole(HttpServletRequest request, RoleAddDto roleAddDto);

    // 删除角色权限 -- 删除之前先判断是否存在用户具备该角色且超管不能删除 -- 超管
    ResponseMessage delRole(HttpServletRequest request, int roleId);

    // 查询平台角色信息 -- 不分页
    ResponseMessage getRoleList(HttpServletRequest request);

    // 编辑平台角色信息 -- 描述信息
    ResponseMessage upRole(HttpServletRequest request, RoleUpDto roleUpDto);

    // 获取当前账号角色权限
    ResponseMessage getAdminRole(HttpServletRequest request);
}
